home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
et
/
et3_0-a1.lha
/
et3
/
src
/
Picture.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-10
|
2KB
|
85 lines
#ifndef Picture_First
#ifdef __GNUG__
//pragma once
#pragma interface
#endif
#define Picture_First
#include "Port.h"
#include "Object.h"
class ObjArray;
class Collection;
enum PicCodes {
cPicEnd= 0,
cPicFont,
cPicInk,
cPicClip,
cPicStartAngle,
cPicEndAngle,
cPicPensize,
cPicPenCap,
cPicStrokeRect,
cPicStrokeRRect,
cPicStrokeOval,
cPicStrokeWedge,
cPicStrokePoly,
cPicFillRect,
cPicFillOval,
cPicFillRRect,
cPicFillWedge,
cPicFillPoly,
cPicHint,
cPicEsc,
cPicShowBitmap,
cPicShowPicture,
cPicXMove0 = 128,
cPicMove = 128+64+0,
cPicLine = 128+64+16,
cPicCornerDia = 128+64+32,
cPicExtent = 128+64+48
};
//---- Picture -----------------------------------------------------------------
class Picture: public Object {
protected:
byte *buf;
int length;
ObjArray *map;
Rectangle bbox;
public:
MetaDef(Picture);
Picture();
Picture(Rectangle &b, byte *pagebuf, long len, ObjArray *m);
~Picture();
void Set(Rectangle &b, byte *pagebuf, long len, ObjArray *m);
bool LoadEPSIfile(const char *name);
int Length()
{ return length; }
Point Offset()
{ return bbox.origin; }
Point Size()
{ return bbox.extent; }
Rectangle BBox()
{ return bbox; }
void Show(Rectangle *r, Port *port);
OStream& PrintOn(OStream&);
IStream& ReadFrom(IStream&);
void CollectParts(Collection *col);
};
#endif